home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / jade / src / keys.h < prev    next >
Text File  |  1995-03-09  |  2KB  |  61 lines

  1. /* keys.h -- Event structures
  2.    Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>
  3.  
  4.    This file is part of Jade.
  5.  
  6.    Jade is free software; you can redistribute it and/or modify it
  7.    under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2, or (at your option)
  9.    any later version.
  10.  
  11.    Jade is distributed in the hope that it will be useful, but
  12.    WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with Jade; see the file COPYING.  If not, write to
  18.    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #define EV_TYPE_KEYBD    0x00000001
  21. #define EV_TYPE_MOUSE    0x00000002
  22. #define EV_TYPE_MASK    0x00000003
  23.  
  24. #define EV_MOD_SHIFT    0x00000004
  25. #define EV_MOD_CTRL    0x00000008
  26. #define EV_MOD_MOD1    0x00000010
  27. #define EV_MOD_BUTTON1    0x00000020
  28. #define EV_MOD_BUTTON2    0x00000040
  29. #define EV_MOD_BUTTON3    0x00000080
  30. #define EV_MOD_MOD2    0x00000100
  31. #define EV_MOD_MOD3    0x00000200
  32. #define EV_MOD_MOD4    0x00000400
  33. #define EV_MOD_MOD5    0x00000800
  34. #define EV_MOD_BUTTON4    0x00001000
  35. #define EV_MOD_BUTTON5    0x00002000
  36.  
  37. #define EV_MOD_MASK    0xfffffffc
  38.  
  39. #define EV_MOD_META    EV_MOD_MOD1
  40. #define EV_MOD_LMB     EV_MOD_BUTTON1
  41. #define EV_MOD_MMB    EV_MOD_BUTTON2
  42. #define EV_MOD_RMB    EV_MOD_BUTTON3
  43.  
  44. /* For EV_TYPE_KEYBD the code is like this,
  45.    X11:
  46.     Standard Keysym's
  47.    Amiga:
  48.     Normal *raw* keycodes  */
  49.  
  50. /* EV_CODE for EV_TYPE_MOUSE events */
  51. #define EV_CODE_MOUSE_CLICK1 1
  52. #define EV_CODE_MOUSE_CLICK2 2
  53. #define EV_CODE_MOUSE_MOVE   3
  54. #define EV_CODE_MOUSE_UP     4
  55.  
  56. /* A `key' is a vector of length 3, it's data is as follows,  */
  57. #define KEY_CODE 0        /* code, i.e. keysym */
  58. #define KEY_MODS 1        /* type & mods */
  59. #define KEY_COMMAND 2        /* command to evaluate */
  60. #define KEY_SIZE 3
  61.